//
//  TXP_RadioCollectionViewCell.m
//  StayAwhile
//
//  Created by dllo on 16/1/28.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TXP_RadioCollectionViewCell.h"
#import <Masonry.h>
@interface TXP_RadioCollectionViewCell ()<UIScrollViewDelegate>
@end
@implementation TXP_RadioCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if ([super initWithFrame:frame]) {
        
        [self craeteSubView];
    }
    
    return self;
}
- (void)craeteSubView{
    
    self.scrollView = [[UIScrollView alloc] initWithFrame:self.contentView.frame];
    _scrollView.contentSize = self.contentView.frame.size;
    self.scrollView.delegate = self;
    [self.contentView addSubview:_scrollView];
    
    self.radioImgView = [[UIImageView alloc] initWithFrame:self.contentView.frame];
    _radioImgView.userInteractionEnabled = YES;
    [_scrollView addSubview:self.radioImgView];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(p_tap:)];
    [_radioImgView addGestureRecognizer:tap];
}
- (void)p_tap:(UITapGestureRecognizer *)tap{
    
    [self.delegate TXPImgDetailCellDidSelectedWithIndex:self.tag - 1000];
    
}
@end
